<template>
	<view class="swiper-box">
		<u-swiper :list="swiperData" indicator indicatorMode="line" height="100" circular></u-swiper>
	</view>
</template>

<script>
	import {
		http,
		uploadFile
	} from '@/api/index.js'
	export default {
		data() {
			return {
				swiperData: [],
			}
		},
		created() {
			this.getList()
		},
		methods: {
			getList() {
				http.post('/api/index/banner').then(res => {
					res.forEach((item, index) => {
						this.swiperData.push(item.image)
					})
				}).catch(err => {

				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.swiper-box {
		width: 100%;
		height: 200rpx;
		overflow: hidden;
		margin-top: 10rpx;

		.u-swiper {
			margin-top: 5rpx;
		}
	}
</style>